#pragma once

#include<stdio.h>
#include<stdlib.h>
#include<string.h>

typedef int data_type;
typedef struct linkNode
{
	data_type data;
	struct linkNode* pNext;
}Link;

enum res
{
	LINKNULL = -3,
	POSERROR,
	EMPTY,
	OK,
};

enum op
{
	TAIL = -1,
	HEAD,
};

Link *createLink(void);

int insertLink(Link* pHaed, int pos, data_type item);

int showLink(Link* pHaed);

int deleteLink(Link* pHaed, int pos, data_type* pData);

int destroyLink(Link** pHaed);

int reverseLink(Link* pHaed);